package org.dromara.wms.domain.bo;

import org.dromara.wms.domain.WmsStockLog;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.math.BigDecimal;

/**
 * 出入库记录业务对象 wms_stock_log
 *
 * @author wenrui Su
 * @date 2024-03-22
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = WmsStockLog.class, reverseConvertGenerate = false)
public class WmsStockLogBo extends BaseEntity {

    /**
     * 事务ID
     */
    @NotNull(message = "事务ID不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 物品id
     */
    @NotNull(message = "物品id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long productId;

    /**
     * 单位
     */
    @NotBlank(message = "单位不能为空", groups = { AddGroup.class, EditGroup.class })
    private String measureUnit;

    /**
     * 批次号
     */
    @NotBlank(message = "批次号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String batchCode;

    /**
     * 单据号
     */
    @NotNull(message = "单据号不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long orderId;

    /**
     * 单价
     */
    @NotNull(message = "单价不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long price;

    /**
     * 仓库ID
     */
    @NotNull(message = "仓库ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long warehouseId;

    /**
     * 库位ID
     */
    @NotNull(message = "库位ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long areaId;

    /**
     * 操作前
     */
    @NotNull(message = "操作前不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal quantityBefore;

    /**
     * 操作数量
     */
    @NotNull(message = "操作数量不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal quantity;

    /**
     * 备注
     */
    @NotBlank(message = "备注不能为空", groups = { AddGroup.class, EditGroup.class })
    private String remark;


}
